﻿using System;

using NUnit.Framework;
using Spring.Testing.NUnit;

using VisualAgile.Model;
using VisualAgile.IDAL;

namespace VisualAgile.UnitTest
{
    [TestFixture]
    public class ProjectDaoTest : AbstractTransactionalDbProviderSpringContextTests
    {
        protected override string[] ConfigLocations
        {
            get
            {
                return new String[] { "objects.xml" };
            }
        }

        protected IProjectDao ProjectDao
        {
            get
            {
                return applicationContext.GetObject("ProjectDao") as IProjectDao;
            }
        }

        [Test]
        public void SaveProjectTest()
        {
            Project project = new Project()
            {
                CreateTime =DateTime.Now,
                Name = "project"
            };
            ProjectDao.Save(project);
            transactionManager.Commit(transactionStatus);
        }       
    }
}
